<!DOCTYPE html>
<html lang="en">
<head>
<!--    投票-->
    <meta charset="UTF-8">
    <title>投票</title>
    <link href="css/zijietiaodong.css" rel="stylesheet">
    <link rel="stylesheet" href="../css/bootstrap.min.css"/>
    <script src="../js/jquery.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/echarts.min.js"></script>
    <style>
        .thumbnail{
            background-color: white;
            margin-top: 10px;
            box-shadow: 0 0 3px 1px rgba(50, 50, 50, 0.5);
            transition: 0.3s;
        }
        .thumbnail:hover {
            background-color: papayawhip;
            margin-top: 5px;
            box-shadow: 0 3px 15px 3px rgba(50, 50, 50, 0.5);
        }
    </style>
</head>
<body>
<div class="container-fluid" id="zong1">
    <div class="row" style="background-color: #ffffff">
        <div class="col-md-12" >
            <nav class="navbar ">
                <div class="container-fluid">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <h1 style="font-weight: bolder;text-shadow:5px 5px 5px #17a2b8 "><img src="../img/bj0.png"/>微小区投票</h1>
                    </div>
                    <!-- Collect the nav links, forms, and other content for toggling -->
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <form class="navbar-form navbar-left ">
                            <span style="margin-left: 70px"><img src="css/hanhua.png"/></span>
                            <div style="padding-top: 30px;" id="csstiaodong" class="form-group" >
                                <c >积</c>
                                <c >极</c>
                                <c >参</c>
                                <c >与</c>
                                <c >社</c>
                                <c >区</c>
                                <c >活</c>
                                <c >动</c>
                            </div>
                            &nbsp;&nbsp;&nbsp;
                            <div style="padding-top: 30px" id="csstiaodong1" class="form-group" >
                                <c >赢</c>
                                <c >取</c>
                                <c >惊</c>
                                <c >喜</c>
                                <c >礼</c>
                                <c >品</c>
                                <c><img src="css/0.png"/></c>
                            </div>
                        </form>
                    </div>
                </div>
            </nav>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-5">
            <div class="carousel slide" data-ride="carousel" data-interval="3000"  id="carousel-547599">
                <ol class="carousel-indicators" id="kongzhiqi">
                </ol>
                <div class="carousel-inner" id="lunbotu">
                </div>
                <a class="left carousel-control" href="#carousel-547599" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                </a>
                <a class="right carousel-control" href="#carousel-547599" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span>
                </a>
            </div>
        </div>
        <div class="col-md-5" style="height: 330px">
            <p>
                社区相关咨询>>
            </p>
            <p>*<a href="https://www.yuhang.gov.cn/art/2022/9/8/art_1532133_59024662.html">良渚文化村上千业主用上国内首个社区APP>></a><span>杭州政府网[引用日期2014-05-27]</span></p>
            <p>*<a href="https://tech.huanqiu.com/article/9CaKrnJELiQ">后互联网时代：用社区APP演绎一种生活方式>></a>中新网[引用日期2014-05-27]</p>
            <p>*<a href="https://www.docin.com/p-966806190.html">花样年借力社区服务APP提升毛利 深耕云服务>></a>腾迅[引用日期2014-05-27]</p>
            <p>*<a href="https://www.renrendoc.com/paper/90057192.html">西方城市公共服务设施供给研究进展及对我国启示>></a></p>
            <p>*<a href="#">城市基本公共服务社区化探析>></a></p>
            <p>*<a href="#">城市社区安全服务中心>></a></p>
            <p>*<a href="#">城市基本公共服务社区化探析>></a></p>
            <p>*<a href="#">城市社区安全服务中心>></a></p>
            <p>*<a href="#">城市安全防范意识调查>></a></p>
            <p>*<a href="#">城市人文建设会议>></a></p>
        </div>
        <div class="col-md-1" style="height: 300px;width: 200px" >
                <img src="css/erweima.png"  style="position: relative;left: 10% ;top: 10%">
                <span  style="position: relative;left: 10% ;top: 10%;">
                    <h4><b style="color: #00c054">微小区官方微信</b></h4>
                </span>
                <span  style="position: relative;left: 10% ;top: 10%;">
                    <b> 扫一扫，关注学信网资讯
            微信号：chsiwx</b>
                </span>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <hr style="width: 20px"/>
        </div>
    </div>
</div>

<script src="css/lunbo.js"></script>
<script type="text/javascript">
    let user;
    function  add(arr){
        $("#btlist li:not(:first)").remove()
        let row ;
        console.log(arr)
        for(let i=0;i<arr.length;i++){
            let obj=arr[i]
            //轮播图设置
            if(i==0){
                //控制器
                $("#kongzhiqi").append("<li class=\"active\" data-slide-to="+i+ " data-target=\"#carousel-547599\">\n" +
                    "                    </li>")
                //轮播图
                $("#lunbotu").append(" <div class=\"item active\">\n" +
                    "                        <img   width='650px' src="+"/img/"+obj.vote_vcover+" />\n" +
                    "                        <div class=\"carousel-caption\">\n" +
                    "                            <h4>\n" +obj.vote_vtitled+
                    "                            </h4>\n" +
                    "                            <p>\n" +obj.vote_vdepict+
                    "                            </p>\n" +
                    "                        </div>\n" +
                    "                    </div>")
            }else {
                $("#kongzhiqi").append("<li data-slide-to="+i+ " data-target=\"#carousel-547599\">\n" +
                    "                    </li>")
                $("#lunbotu").append(" <div class=\"item\">\n" +
                    "                        <img width='650px'  src="+"/img/"+obj.vote_vcover+" />\n" +
                    "                        <div class=\"carousel-caption\">\n" +
                    "                            <h4>\n" +
                    "                                +'First Thumbnail label'+\n" +
                    "                            </h4>\n" +
                    "                            <p>\n" +
                    "                               +'First Thumbnail label'+\n" +
                    "                            </p>\n" +
                    "                        </div>\n" +
                    "                    </div>")
            }

            if(i%4==0){
                row =document.createElement("div")
                $(row).attr("class","row")
                $(row).attr("name","rows")
                $("#zong1").append(row)
            }
            let div1 =  document.createElement("div")
            $(div1).attr("class","col-md-3")
            div1.style.padding="50px"
            div1.style.backgroundColor="blue"
            div1.style.backgroundImage="linear-gradient(0deg,#ffffff,blue)"
            $(row).append(div1)
            let div2 =  document.createElement("div")
            $(div2).attr("height","450px")
            $(div2).attr("href","#")
            $(div2).attr("class","thumbnail")
            $(div1).append(div2)
            let img =  document.createElement("img")
            let imgs = "/img/"+obj.vote_vcover
            $(img).attr("src",imgs)
            $(img).attr("class","img-circle")
            let shanchu =  document.createElement("span")
            $(shanchu).text("xaaaaaaaaaaa")
            // $(div1).attr("href","#motak3")
            $(div1).attr("name","one")
            // $(div1).attr("data-toggle","modal")
            $(div1).on("click",function(){
                localStorage.setItem("vote",JSON.stringify(obj))
                window.location.href="poll.html";
            });
            let div3 =  document.createElement("div")
            $(div3).attr("class","caption")
            $(div3).html(" <h5 style='text-align: center;font-weight: bolder;font-size: larger'>"+obj.vote_vtitled+"</h5>\n")
            div2.style.height="280px"
            $(div2).append(img,div3)
        }


        let jiewei = document.createElement("div")
        $(jiewei).attr("class","row")
        let md = document.createElement("div")
        $(md).attr("class","col-md-12")
        md.innerHTML="<p style='text-align: center'>微小区服务</p><p style='text-align: center'>联系电话：18345879654</p><p style='text-align: center'>地址：襄阳市樊城区长虹路28号</p>";
        $(jiewei).append(md)
        $("#zong1").append(jiewei)
    };

    /**
     * 加载所有数据
     */
    $.ajax({
        url:"getAllwenjuan",
        type:"get",
        dataType:"json",
        success:function(data){
            add(data)
        }
    });

    /**
     * 判断是否是住户
     */
    $.ajax({
        url:"iszhuhu",
        type:"get",
        dataType:"json",
        success:function(data){
           if(data){
               user="zh"
           }else {
               user="gly"
           }
        }
    });

</script>
</body>
</html>